package com.zx._10_设计模式._0_综合案例.任务状态变更;

public class TaskInit implements State{

    @Override
    public void updateState(Task task, ActionType actionType) {
        if(ActionType.START.equals(actionType)) {
            task.setState(new TaskDoing());
        } else if(ActionType.EXPIRE.equals(actionType)){
            task.setState(new TaskExpired());
        }
    }
}